package com.chinact.saas.tenant.orggroup.webtier;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.chinact.platform.util.exception.SystemErrorExcetion;
import com.chinact.saas.tenant.orggroup.domain.OrgGroupObj;
import com.chinact.saas.tenant.orggroup.service.IOrgGroupService;

/**
 * Title: ChinaCT SaaS
 * <p>
 * Description: 组织归口Controller
 * <p>
 * Copyright: 2008
 * <p>
 * Company: Liaoning Open Data Communication Co.,Ltd.
 *
 * @author lihui
 * @version 1.0.0
 */
@Controller
public class OrgGroupController {
	@Autowired(required = false)
	private IOrgGroupService upOrgGroupService;

	/**
	 * 添加or修改 组织归口
	 *
	 * @param request
	 *            HttpServletRequest
	 * @param response
	 *            HttpServletResponse
	 * @return /saas/tenant/user/orgGroupList.jsp
	 */
	@RequestMapping("/tenant/orgGroup/saveOrEditOrgGroup.xhtml")
	public void saveOrEditOrgGroup(final HttpServletRequest request, final HttpServletResponse response) {

		OrgGroupObj objBySave = new OrgGroupObj();
		objBySave.setOrgGroupName("C测33111");
		try {
			upOrgGroupService.saveOrUpdate(objBySave);
		} catch (final SystemErrorExcetion e) {
			System.out.println(e.getErrorDesc());
		}
	}

}
